home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / BROWSERS / GLUESTIK.ZOO / pipe.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-30  |  2.1 KB  |  83 lines

  1. #ifndef PIPE_H
  2. #define PIPE_H
  3.  
  4. #include <types.h>
  5. #include "drivers.h"
  6. #include "transprt.h"
  7.  
  8.  
  9. typedef union {
  10.   struct { int op; } common;
  11.   struct { int op; uint32 hostaddr; int16 port; int16 tos; uint16 obsize; }
  12.     P_TCP_open;
  13.   struct { int op; int16 fd; int16 timeout; } P_TCP_close;
  14.   struct { int op; int16 fd; char *buf; int16 buflen; } P_TCP_send;
  15.   struct { int op; int16 fd; int16 state; int16 timeout; } P_TCP_wait_state;
  16.   struct { int op; uint32 hostaddr; int16 port; } P_UDP_open;
  17.   struct { int op; int16 fd; } P_UDP_close;
  18.   struct { int op; int16 fd; char *buf; int16 buflen; } P_UDP_send;
  19.   struct { int op; int16 fd; } P_CNbyte_count;
  20.   struct { int op; int16 fd; } P_CNget_char;
  21.   struct { int op; int16 fd; } P_CNget_NDB;
  22.   struct { int op; int16 fd; char *buf; int16 len; } P_CNget_block;
  23.   struct { int op; char *hostname; char **realname; uint32 *addrs;
  24.        int16 naddrs; } P_resolve;
  25.   struct { int op; int16 fd; } P_CNgetinfo;
  26.   struct { int op; int32 size; } P_KRmalloc;
  27.   struct { int op; char *mem; } P_KRfree;
  28.   struct { int op; int16 flag; } P_KRgetfree;
  29.   struct { int op; char *mem; int32 newsize; } P_KRrealloc;
  30.   struct { int op; char *var; } P_getvstr;
  31. } Daemon_Op;
  32.  
  33. typedef union {
  34.   int16 ret_int16;
  35.   char *ret_charptr;
  36.   int32 ret_int32;
  37.   NDB  *ret_NDBptr;
  38.   CIB  *ret_CIBptr;
  39. } Daemon_Retval;
  40.  
  41. #if 0
  42. typedef struct {
  43.   unsigned long magic;
  44. #define GSDAEMON_MAGIC    0x476c7565L    /* 'Glue' */
  45.   Daemon_Op *OP;
  46.   Daemon_Retval *RET;
  47.   pid_t daemon_pid;
  48.   pid_t user_pid;
  49. } Daemon_Interface;
  50. #endif
  51.  
  52. /* daemon ops */
  53. #define OP_TCP_OPEN        1
  54. #define OP_TCP_CLOSE        2
  55. #define OP_TCP_SEND        3
  56. #define OP_TCP_WAIT_STATE    4
  57. #define OP_UDP_OPEN        5
  58. #define OP_UDP_CLOSE        6
  59. #define OP_UDP_SEND        7
  60. #define OP_CNBYTE_COUNT        8
  61. #define OP_CNGET_CHAR        9
  62. #define OP_CNGET_NDB        10
  63. #define OP_CNGET_BLOCK        11
  64. #define OP_RESOLVE        12
  65. #define OP_CNGETINFO        13
  66. #define OP_KRMALLOC        14
  67. #define OP_KRFREE        15
  68. #define OP_KRGETFREE        16
  69. #define OP_KRREALLOC        17
  70. #define OP_GETVSTR        18
  71. #define OP_MAX            18
  72.  
  73.  
  74. #if 0
  75. extern Daemon_Op OP;
  76. extern Daemon_Retval RET;
  77. extern Daemon_Interface *DMN;
  78. #endif
  79.  
  80. void send_op __PROTO((Daemon_Op *, Daemon_Retval *));
  81.  
  82. #endif /* PIPE_H */
  83.